﻿using System;
using System.Collections.Generic;
using System.Text;
using T.FAS.Runtime.Expression.Entity;
using T.ServiceComponent.Database.Service;

namespace T.FAS.Runtime.Expression.Dev.Dao.Logic
{
    public class ExprDesignConfigLogic
    {
        ExprDesignConfigDao exprDesignConfigDao = new ExprDesignConfigDao();
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="exprDesignConfig"></param>
        public void AddExprDesignConfig(ExprDesignConfig exprDesignConfig)
        {
            exprDesignConfig.ID = Guid.NewGuid().ToString();
            exprDesignConfig.Creator = ExprItemLogic.userName;
            exprDesignConfig.CreateTime = DateTime.Now;
            exprDesignConfig.LastModifier = ExprItemLogic.userName;
            exprDesignConfig.LastModifyTime = DateTime.Now;
            exprDesignConfigDao.Add(new List<object> { exprDesignConfig });
        }
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="configType"></param>
        /// <returns></returns>
        public List<ExprDesignConfig> GetExprDesignConfigList(string configType)
        {
            return exprDesignConfigDao.GetExprDesignConfigs(configType);
        }
    }
}
